<?php namespace App\Models;

use Illuminate\Database\Eloquent\Model;


class Property extends Model
{
    
    
    protected $table = 'xyj_property';
    
    public static function getValueByIndex($type,$index)
    {
        try {
            $value = self::where(['type' => $type , 'index' => $index])->first()->value;
            return $value;
        }catch (\Exception $e) {
            return '';
        }
    }
    
    public static function getList($type)
    {
        $list = self::where('type','=',$type)->lists('value','index')->toArray();
        return $list;
    }
}
